<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>{$title}</title>
    <meta name="keywords" content="我的店铺">
    <meta name="description" content="我的店铺">

    <link href="/Partner/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/Partner/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/Partner/static/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/Partner/static/css/animate.min.css" rel="stylesheet">
    <link href="/Partner/static/css/style.min.css?v=4.0.0" rel="stylesheet">
    <base target="_self">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">


    <div class="page-content" style="padding: 0;border: none;">

        <form action="{:U('Store/store_Save')}" method="post" class="form form-horizontal" role="form">
            <div class="panel-body" style="padding: 0;border: none;">
                <input type="hidden" name="id" value="{$current.id}" />
                <div class="tab-content" style="padding: 16px 12px 55px 12px;">
                    <div class="row panel-body">
                        <php>if($_GET['id']){</php>
                        <a href="{:U('Store/store_list')}" class="btn btn-sm btn-default">店铺管理</a>
                        <a href="{:U('Store/shopadd')}" class="btn btn-sm btn-default">添加店铺</a>
                        <php>
                            if($type==1){
                        </php>
                        <a href="javascript:;" class="btn btn-sm btn-primary">编辑店铺</a>
                        <php>}else{</php>
                        <a href="javascript:;" class="btn btn-sm btn-primary">查看店铺</a>
                        <php>}</php>

                        <php>}else{</php>
                        <a href="{:U('Store/store_list')}" class="btn btn-sm btn-default">店铺管理</a>
                        <a href="{:U('Store/shopadd')}" class="btn btn-sm btn-primary">添加店铺</a>
                        <php>}</php>

                    </div>
                    <section class="panel-default m-b-sm" style="margin:5px 0;">
                        <div class="alert alert-info">
                            <p>
                                <i class="fa fa-hand-o-right m-r-xs"></i><strong>操作提示</strong>
                            </p>
                            <p class="alert-p m-l-xl"><i class="fa fa-caret-right m-r-xs"></i>该页面可对店铺进行添加编辑修改操作。</p>
                        </div>
                    </section>
<php>

    if($type==0){
        $user['phone']= substr_replace($user['phone'],'****',3,4);
        $current['id_card']= substr_replace($current['id_card'],'***********',4,11);
    }

</php>
                    <div class="tab-pane fade active in" id="apply">
                        <section class="panel panel-default">
                            <header class="panel-heading font-bold"> 基本信息 </header>
                            <div class="panel-body">
                                <php>if(!$_GET['id']){</php>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">注册手机号</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" id="res_phone" value="" >
                                    </div>
                                    <input type="button" id="search_res_phone" value="搜索" class="btn btn-sm"/>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">绑定用户ID</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" datatype="required" data="绑定用户ID" name="uid" id="b_uid" value="{$current.uid}" readonly="readonly">
                                    </div>

                                </div>
                                <php>}else{</php>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">绑定用户手机</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" datatype="required" data="绑定用户手机"  value="{$user.phone}" readonly="readonly">
                                        <input type="hidden" class="form-control" datatype="required" data="绑定用户ID" name="uid" id="b_uid" value="{$current.uid}" readonly="readonly">
                                    </div>

                                </div>
                                <php>}</php>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">店铺分类</label>
                                    <div class="col-md-3">
                                        <php>$types_array=explode(',',$current['store_classification_type']);</php>
                                        <select name="store_classification_type[]" class="selectpicker show-tick form-control" multiple data-live-search="false" required <eq name="type" value="0">readonly</eq>>
                                            <foreach name="store_classifications" item="v" key="k">
                                                <php>
                                                    if(in_array($v['id'],$types_array)){ $selected='selected'; }else{ $selected=''; }
                                                </php>

                                                <option value="{$v.id}" {$selected} <eq name="k" value="0">selected</eq>>{$v.classification}</option>
                                            </foreach>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">店铺名称</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" datatype="required" data="店铺名称" name="title" value="{$current.title}" <eq name="type" value="0">readonly</eq>>
                                    </div>
                                </div>

                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">店铺seo关键词</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" name="keywords" value="{$current.keywords}" <eq name="type" value="0">readonly</eq>> 多个关键词以英文逗号隔开 如：网上购物,网上商城,手机,笔记本,电脑
                                    </div>
                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">店铺seo描述</label>
                                    <div class="col-md-3">
                                        <textarea name="description" class="form-control" <eq name="type" value="0">readonly</eq>>{$current.description}</textarea>
                                    </div>
                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">公司所在地</label>
                                    <div class="col-md-2">
                                        <select class="form-control m-b" name="province" id="seleAreaNext" onchange="getProvince(this,'#seleAreaThird')" <eq name="type" value="0">readonly</eq>>
                                            <option value="">请选择省</option>
                                        </select>
                                    </div>
                                    <div class="col-md-2">
                                        <select class="form-control m-b" name="city" id="seleAreaThird" onchange="getSelCity(this, '#seleAreaFouth')" <eq name="type" value="0">readonly</eq>>
                                            <option value="">请选择市</option>
                                        </select>
                                    </div>
                                    <div class="col-md-2">
                                        <select class="form-control m-b" name="district" id="seleAreaFouth" <eq name="type" value="0">readonly</eq>>
                                            <option value="-1">请选择区</option>
                                        </select>
                                    </div>

                                </div>


                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">公司坐标</label>
                                    <div class="col-md-3" >

                                        <div class="row row-fix">
                                            <div class="col-xs-4 col-sm-4">
                                                <input type="text" name="lng" value="{$current.lng}" id="lng" placeholder="地理经度" class="form-control" <eq name="type" value="0">readonly</eq>>
                                            </div>
                                            <div class="col-xs-4 col-sm-4">
                                                <input type="text" name="lat" value="{$current.lat}"id="lat"  placeholder="地理纬度" class="form-control" <eq name="type" value="0">readonly</eq>>
                                            </div>
                                            <div class="col-xs-4 col-sm-4">
                                                <button onclick="show()"  class="btn btn-default" type="button">选择坐标</button>
                                            </div>
                                        </div>

                                    </div>
                                </div>

                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">公司详细地址</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" datatype="required" data="公司详细地址" id="company_address_detail" name="rel_address" <eq name="type" value="0">readonly</eq> value="{$current.rel_address}">
                                    </div>
                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">是否全网</label>
                                    <div class="col-md-3">
                                        <label class="switch"><input name="quanwang" <eq name="type" value="0">readonly</eq> type="checkbox" <eq name="current.quanwang" value="1">checked</eq>><span></span></label>
                                    </div>
                                </div>

                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">联系人姓名</label>
                                    <div class="col-md-2" style="padding-top: 2px">
                                        <input type="text" class="form-control" name="rel_name" value="{$current.rel_name}" datatype="required" data="联系人姓名" <eq name="type" value="0">readonly</eq>>
                                    </div>
                                    <label class="col-sm-2 control-label">客服电话</label>
                                    <div class="col-md-2" style="padding-top: 2px">
                                        <input type="text" class="form-control" name="rel_phone" value="{$current.rel_phone}" <eq name="type" value="0">readonly</eq>>
                                    </div>
                                    <label class="col-sm-2 control-label">电子邮箱</label>
                                    <div class="col-md-2" style="padding-top: 2px">
                                        <input type="text" class="form-control" name="rel_email" value="{$current.rel_email}" <eq name="type" value="0">readonly</eq>>
                                    </div>

                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">

                                    <label class="col-sm-2 control-label">身份证</label>
                                    <div class="col-md-2" style="padding-top: 2px">
                                        <input type="text" class="form-control" name="id_card" value="{$current.id_card}" datatype="required" data="身份证" <eq name="type" value="0">readonly</eq>>
                                    </div>

                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">

                                    <label class="col-sm-2 control-label">QQ</label>
                                    <div class="col-md-2" style="padding-top: 2px">
                                        <input type="text" class="form-control" id="contacts_email" name="shop_qq" value="{$current.shop_qq}" <eq name="type" value="0">readonly</eq>>
                                    </div>
                                    <label class="col-sm-2 control-label">阿里旺旺</label>
                                    <div class="col-md-2" style="padding-top: 2px">
                                        <input type="text" class="form-control" id="contacts_email" name="shop_ww" value="{$current.shop_ww}" <eq name="type" value="0">readonly</eq>>
                                    </div>
                                </div>

                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">店铺公告</label>
                                    <div class="col-md-3">
                                        <textarea name="notice" class="form-control" <eq name="type" value="0">readonly</eq>>{$current.notice}</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">店铺介绍</label>
                                    <div class="col-md-10">
                                        <textarea name="pt_jieshao" class="form-control editor" <eq name="type" value="0">readonly</eq>>{$current.pt_jieshao}</textarea>
                                    </div>
                                </div>

                            </div>
                        </section>
<php>
    if($type==1){
</php>
                        <section class="panel panel-default" id="settlement_info" style="">
                            <header class="panel-heading font-bold"> 结算账号信息（支付宝） </header>
                            <div class="panel-body">

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">支付宝帐号</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" name="ali_number" value="{$current.ali_number}" datatype="required" data="支付宝帐号" <eq name="type" value="0">readonly</eq>>
                                    </div>
                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">真实姓名</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" name="ali_name" value="{$current.ali_name}" datatype="required" data="真实姓名" <eq name="type" value="0">readonly</eq>>
                                    </div>
                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">验证手机号</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" name="ali_phone" value="{$current.ali_phone}" datatype="required" data="验证手机号" <eq name="type" value="0">readonly</eq>>
                                    </div>
                                </div>

                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">平台抽取比率</label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control" name="extraction" value="{$current['extraction']*100}" style="width: 50%;float: left;" <eq name="type" value="0">readonly</eq>>
                                        <span style="width: 50%;float: left;height: 35px;line-height: 35px;">%</span>
                                    </div>
                                </div>


                            </div>
                        </section>
<php>}</php>
                        <section class="panel panel-default" id="settlement_info" style="">
                            <header class="panel-heading font-bold"> 店铺属性 </header>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">所属等级</label>
                                    <div class="col-md-4">
                                        <select id="shop_type" name="store_type" class="form-control m-b" <eq name="type" value="0">readonly</eq>>
                                            <option value="1" <eq name="current.store_type" value="1">selected</eq>>直营店铺</option>
                                            <option value="2" <eq name="current.store_type" value="2">selected</eq>>加盟店铺</option>
                                        </select>

                                    </div>
                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">描述相符度分数</label>
                                    <div class="col-md-4">
                                        <select id="shop_desccredit" name="store_desccredit" class="form-control m-b" <eq name="type" value="0">readonly</eq>>
                                            <option value="1" <eq name="current.store_desccredit" value="1">selected</eq>>1星</option>
                                            <option value="2" <eq name="current.store_desccredit" value="2">selected</eq>>2星</option>
                                            <option value="3" <eq name="current.store_desccredit" value="3">selected</eq>>3星</option>
                                            <option value="4" <eq name="current.store_desccredit" value="4">selected</eq>>4星</option>
                                            <option value="5" <eq name="current.store_desccredit" value="5">selected</eq>>5星</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">服务态度分数</label>
                                    <div class="col-md-4">
                                        <select id="shop_servicecredit" name="store_servicecredit" class="form-control m-b" <eq name="type" value="0">readonly</eq>>
                                            <option value="1" <eq name="current.store_servicecredit" value="1">selected</eq>>1星</option>
                                            <option value="2" <eq name="current.store_servicecredit" value="2">selected</eq>>2星</option>
                                            <option value="3" <eq name="current.store_servicecredit" value="3">selected</eq>>3星</option>
                                            <option value="4" <eq name="current.store_servicecredit" value="4">selected</eq>>4星</option>
                                            <option value="5" <eq name="current.store_servicecredit" value="5">selected</eq>>5星</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">发货速度分数</label>
                                    <div class="col-md-4">
                                        <select id="shop_deliverycredit" name="store_deliverycredit" class="form-control m-b" <eq name="type" value="0">readonly</eq>>
                                            <option value="1" <eq name="current.store_deliverycredit" value="1">selected</eq>>1星</option>
                                            <option value="2" <eq name="current.store_deliverycredit" value="2">selected</eq>>2星</option>
                                            <option value="3" <eq name="current.store_deliverycredit" value="3">selected</eq>>3星</option>
                                            <option value="4" <eq name="current.store_deliverycredit" value="4">selected</eq>>4星</option>
                                            <option value="5" <eq name="current.store_deliverycredit" value="5">selected</eq>>5星</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="line line-dashed line-lg pull-in"></div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">店铺状态</label>
                                    <div class="col-md-10">
                                        <div class="col-md-3">
                                            <p>首页推荐</p>

                                            <label class="switch"><input name="recommend" type="checkbox" <eq name="type" value="0">readonly</eq> <eq name="current.recommend" value="1">checked</eq>><span></span></label>
                                        </div>
                                        <div class="col-md-3">
                                            <p>推广</p>
                                            <label class="switch"><input name="spread" type="checkbox"<eq name="type" value="0">readonly</eq> <eq name="current.spread" value="1">checked</eq>><span></span></label>
                                        </div>
                                        <div class="col-md-3">
                                            <p>是否开启</p>
                                            <label class="switch"><input name="status" type="checkbox"<eq name="type" value="0">readonly</eq> <eq name="current.status" value="1">checked</eq>><span></span></label>
                                        </div>
                                        <!--<div class="col-md-3">
                                                <p>退货承诺</p>
                                                <label class="switch"><input id="shop_tuihuo" type="checkbox"><span></span></label>
                                            </div>
                                            <div class="col-md-3">
                                                <p>试用中心</p>
                                                <label class="switch"><input id="shop_shiyong" type="checkbox"><span></span></label>
                                            </div>
                                            <div class="col-md-3">
                                                <p>实体验证</p>
                                                <label class="switch"><input id="shop_shiti" type="checkbox"><span></span></label>
                                            </div>
                                            <div class="col-md-3">
                                                <p>消协保证</p>
                                                <label class="switch"><input id="shop_xiaoxie" type="checkbox" checked=""><span></span></label>
                                            </div>
                                            <div class="col-md-3">
                                                <p>货到付款</p>
                                                <label class="switch"><input id="shop_huodaofk" type="checkbox"><span></span></label>
                                            </div>-->
                                    </div>
                                </div>
                            </div>

                        </section>
                        <php>if($_GET['id']){</php>
                        <eq name="type" value="1">
                            <div class="col-sm-4 col-sm-offset-2" style="margin-top: 10px;">
                                <button class="formSubmit btn btn-primary btn-sm" id="form" value="保存" ajax="1" type="button">保存</button> &nbsp; &nbsp; &nbsp;
                                <button class="btn btn-primary btn-sm btn-danger" value="取消" type="button" onclick="history.back(-1);">取消</button>
                            </div>
                        </eq>
                        <php>}else{</php>
                        <div class="col-sm-4 col-sm-offset-2" style="margin-top: 10px;">
                            <button class="formSubmit btn btn-primary btn-sm" id="form" value="保存" ajax="1" type="button">保存</button> &nbsp; &nbsp; &nbsp;
                            <button class="btn btn-primary btn-sm btn-danger" value="取消" type="button" onclick="history.back(-1);">取消</button>
                        </div>
                        <php>}</php>
                        </div>

                </div>
            </div>

        </form>
    </div>
    <input type="hidden" id="company_province_id" value="{$current.province}">
    <input type="hidden" id="company_city_id" value="{$current.city}">
    <input type="hidden" id="company_district_id" value="{$current.district}">


</div>


<script src="/Partner/static/js/jquery.min.js?v=2.1.4"></script>
<script src="/Partner/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="/Partner/static/js/content.min.js?v=1.0.0"></script>
<script src="/Partner/static/js/plugins/iCheck/icheck.min.js"></script>

<script type="text/javascript" src="/static/js/jquery.uploadify.js"></script>
<script src="/static/js/layer2.1/layer.js"></script>
<script type="text/javascript" src="/NewAdmin/js/common.js"></script>
<script type="text/javascript" src="/NewAdmin/js/main.js"></script>
<script charset="utf-8" src="/static/js/kindeditor-4.1.10/kindeditor.js"></script>
<script charset="utf-8" src="/static/js/kindeditor-4.1.10/lang/zh_CN.js"></script>

<script type="text/javascript">
    var fromType	=	"0";
    KindEditor.options.filterMode = false;
    KindEditor.ready(function(K) {
        window.editor = K.create('.editor',{filterMode: false,width:'80%',height:'400px',afterBlur:function(){this.sync();}});
    });

</script>

<script>
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
</script>

<script>
    //全局变量
    var GV = {
        DIMAUB: "/",
        JS_ROOT: "NewAdmin/js/",
        TOKEN: ""
    };
</script>
<script type="text/javascript" src="/NewAdmin/js/webuploader/webuploader.js"></script>
<script type="text/javascript" src="/NewAdmin/js/webuploader/getting-started.js"></script>
<link rel="stylesheet" href="/NewAdmin/css/webuploader.css" />
<script src="/NewAdmin/js/wind.js"></script>
<link href="/NewAdmin/js/artDialog/skins/default.css" rel="stylesheet" />
<script src="/NewAdmin/js/zhlmy.js"></script>
<script src="/NewAdmin/js/init_address.js"></script>
<script type="text/javascript">
    var BASE_URL = '/NewAdmin/js/webuploader/';
    var UPLOAD_SERVER = '{:U("User/uploadify_wb")}';
    var UpFilePathInfo = '<?=$menuCurrent['UpFilePathInfo']?>';
    $(function() {
        if($("#company_province_id").val() == null) {
            provice_id = 0;
        } else {
            provice_id = $("#company_province_id").val();
        }
        if($("#company_city_id").val() == null) {
            city_id = -1;
        } else {
            city_id = $("#company_city_id").val();
        }
        if($("#company_district_id").val() == null) {
            district_id = -1;
        } else {
            district_id = $("#company_district_id").val();
        }

        if(provice_id == 0) {
            initProvince('#seleAreaNext');
        } else {
            load('province', provice_id, 'city', city_id, 'district', district_id);
        }

        $('#uploader img').attr('src', UpFilePathInfo);
        $(':input[name="UpFilePathInfo"]').val(UpFilePathInfo);
        $("#uploader").setUploader(null, {
            uploadImgType: 'normal',
            thumb: {
                height: 102
            }
        });
        $('#search_res_phone').click(function(){
            var phone=$('#res_phone').val();
            if(phone){
                $.get('/store/search_phone/phone/'+phone, function(data) {
                    if(data==0){
                        layer.msg('该用户不存在！');

                    }else if(data==1){
                        layer.msg('该用户已经开店！');
                    }else{
                        $('#b_uid').val(data.id);
                    }
                });
            }else{
                layer.msg('请输入绑定手机号');
            }
        })
    });
</script>


<div id="drag">
    <div class="title">
        <h2>1.选择位置>2.标注位置>3.保存位置</h2>

    </div>
    <div class="content">
        <div id="f_container">
            <div id="container"></div>
        </div>
        <div id="allmap" style="width:790px;height:500px;"></div>
        <div style="margin: 15px;text-align: right">
            <input type="hidden" id="lat"><input type="hidden" id="lng">
            <input type="button" onclick="showMap();" class="btn" value="保存">
            <input type="button" onclick="dhide()" class="btn" value="取消">
        </div>
    </div>
</div>





<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=826e806b86676d155282de3d37188137"></script>
<script src="http://api.map.baidu.com/library/MarkerTool/1.2/src/MarkerTool_min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/CityList/1.4/src/CityList_min.js"></script>
<script type="text/javascript" src="/static/js/tuodong.js"></script>



<style type="text/css">
    /* drag */
    #drag{position:absolute;top:10%;left:35%;width:800px;height:auto;background:#e9e9e9;border:1px solid #444;border-radius:5px;box-shadow:0 1px 3px 2px #666;display: none;z-index: 9999;}
    #drag .title{position:relative;height:27px;margin:5px;}
    #drag .title h2{font-size:14px;height:27px;line-height:24px;border-bottom:1px solid #A1B4B0;}
    #drag .title div{position:absolute;height:19px;top:2px;right:0;}
    #drag .title a{float:left;width:21px;height:19px;display:block;margin-left:5px;background:url(/static/images/tool.png) no-repeat;}
    #drag .title a.max{background-position:-60px 0;}
    #drag .title a.max:hover{background-position:-60px -29px;}
    #drag .title a.revert{background-position:-149px 0;display:none;}
    #drag .title a.revert:hover{background-position:-149px -29px;}
    #drag .title a.close{background-position:-89px 0;}
    #drag .title a.close:hover{background-position:-89px -29px;}
    #drag .content{overflow:auto;margin:0 5px;}

    #f_container{border: 1px solid #999999;position: absolute;top:50px;left: 10px;z-index: 1000;    }
    #container{width:290px;overflow: hidden;height: 75px;background:#F2F3F5;border: 5px solid #F2F3F5; }
    #container select{border: 1px solid #ccc;}
    .content .btn{width:105px; height: 30px;font-size: 13px; }
</style>
<script type="text/javascript">
    var marker, oDrag = document.getElementById("drag");
    // 百度地图API功能
    var map = new BMap.Map("allmap");            // 创建Map实例
    map.enableScrollWheelZoom(true);
    map.addControl(new BMap.ScaleControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT}));    // 右下比例尺
    map.setDefaultCursor("Crosshair");//鼠标样式
    map.addControl(new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_RIGHT}));  //右上角，仅包含平移和缩放按钮
    var cityList = new BMapLib.CityList({
        container: 'container',
        map: map
    });
    map.addEventListener("click", showInfo);
    function showInfo(e){
        map.clearOverlays();
        marker = new BMap.Marker(new BMap.Point(e.point.lng, e.point.lat));  // 创建标注
        map.addOverlay(marker);
        //获取经纬度
        document.getElementById("lng").value = e.point.lng;
        document.getElementById("lat").value = e.point.lat;
    }

    function show(){
        map.centerAndZoom('北京',12);                   // 初始化地图,设置城市和地图级别。
        oDrag.style.display = "block";

    }
    function dhide(){
        map.clearOverlays();

        oDrag.style.display = "none";
    }

    function showMap(){
        oDrag.style.display = "none";
        var map1 = new BMap.Map("show_map");
        var lng = document.getElementById("lng").value;
        var lat = document.getElementById("lat").value;
        map1.centerAndZoom(new BMap.Point(lng, lat), map.getZoom());
        var marker1 = new BMap.Marker(new BMap.Point(lng, lat));  // 创建标注
        map1.addOverlay(marker1);              // 将标注添加到地图中
    }
</script>
</body>

</html>